import {
	createApp
} from 'vue'
import App from './App.vue'
const app = createApp(App);



//vuex储存
import store from './store';
app.use(store); // 使用store

//路由
import router from './router/index'
app.use(router)

//全局样式
import './utils/main.css'

// 页面权限控制
import './utils/permission.js'

//引入全部api接口，通过this.api_接口名调用
import * as apis from "./api/user.js";
for (let i in apis) {
	app.config.globalProperties['$api_' + i] = apis[i];
}

// Element Plus图标集合，如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

//引入UI库
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// app.use(ElementPlus)

app.mount('#app');